<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>
        <!--(kev) Stations-Detailanzeige-->
        <ui:composition template="index.xhtml">
            <ui:define name="left">
               <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            <h2>#{stationViewManager.selectedStation.name}</h2>
                        </f:facet>
                    </h:column>
                </h:dataTable>
                <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Id: #{stationViewManager.selectedStation.id}
                        </f:facet>
                    </h:column>
                </h:dataTable>
                <h:dataTable value="" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Lat./lng.: #{stationViewManager.selectedStation.stationLatitude}, #{stationViewManager.selectedStation.stationLongitude}
                        </f:facet>
                    </h:column>
                </h:dataTable>
                <h:dataTable value="#{stationViewManager.selectedStation.neighbors}" var="station" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Neighbors:
                        </f:facet>
                        <h:form>
                            <h:commandLink action="#{stationViewManager.returnLinkToStationView(station)}" >#{station}</h:commandLink> <br />
                        </h:form>
                    </h:column>
                </h:dataTable> 
                <h:dataTable value="#{dataManager.lineList}" var="line" width="100%">
                    <h:column>
                        <f:facet name="header">
                            Lines:
                        </f:facet>
                        <h:form>
                            <h:commandLink rendered="#{stationViewManager.selectedStation.isServedBy(line)}" action="#{lineViewManager.returnLinkToLineView(line)}" >#{line}</h:commandLink> <br />
                        </h:form>
                        <h:dataTable rendered="#{stationViewManager.selectedStation.isServedBy(line)}" value="#{line.getReadableDepartureTimes(stationViewManager.selectedStation)}" var="string">
                            <h:column>
                                #{string}
                            </h:column>
                        </h:dataTable>
                    </h:column>
                </h:dataTable>
            </ui:define>
        </ui:composition>
    </body>
</html>
